<?php if(sfContext::getInstance()->getUser()->isAuthenticated()):?>
    <div class="top_line_menu">
            <div class="line_top_back">
                <img class="floatleft" src="/images/line_top_left.gif" alt="#" />
                <img class="floatright" src="/images/line_top_right.gif" alt="#" />
                <?php echo link_to(__('Выход'),'@sf_guard_signout','class="exit_my_profile"')?> 
                <?php echo link_to(__('My profile'),'profile/mypage')?>
                <?php if(sfContext::getInstance()->getUser()->getProfile()->getGender()=='m'):?>
                  <?php echo link_to(__('Gallery'),'@gallery_woman')?>
                <?php else: ?>
                  <?php echo link_to(__('Gallery'),'@gallery_men')?>
                <?php endif ?>
              
                <?php echo link_to(__('Search'),'search/advform')?>
            </div>
    </div>
<?php endif ?>    